home *** CD-ROM | disk | FTP | other *** search
/ Doonesbury Toonscapes / Doonesbury Toonscapes - Disc 2.iso / install / flash.inf < prev    next >
INI File  |  1995-10-13  |  49KB  |  1,627 lines

  1. DefineVariables
  2.   Text          [ProductName]           := Doonesbury Flashbacks
  3.   Text                    [AbbreviatedName]                := Flash
  4.     Text                    [MainExeName]                        := DA.EXE
  5.     Text                    [ProductVersion]                := 1.0.0
  6.     Text          [HelpFileName]          := DA.HLP
  7.     Text                    [ProductIniFile]                := DA.INI
  8.     Text                    [ProgGrpName]                        := Doonesbury Flashbacks
  9.     Text                    [ProgGrpFileName]                := DOONESBU.GRP
  10.     Text                    [IconName]                            := DA.ICO
  11.     Text          [BitmapName]            := INSTALL.BMP
  12.     Number                [XBmp]                  := 640
  13.     Number                [YBmp]                  := 480
  14.   Directory     [DefaultDestDir]        := DF
  15.   Text                [DefaultDestDir95]      := Program Files\Doonesbury Flashbacks
  16.     Directory     [SetupDir]              := SETUP
  17.     Directory     [SourceDir]             := DA
  18.   Directory     [TargetDir]             := BlankString
  19.   Directory            [TargetDrive]                        := BlankString
  20.     Directory            [UninstallDirectory]    := BlankString
  21.     Directory     [SetupDirectory]                 := BlankString
  22.     Text                    [FileReplaceExe]                := BlankString
  23.     Number                [Options]                                := 3
  24.     Logical                [Complete]                            := N
  25.     Logical                [Typical]                                := N
  26.     Logical                [Minimal]                                := N
  27.     Logical                [IsWin95]               := N
  28.     Logical                [IsWinNT]               := N
  29.   Logical       [PreviousInstall]       := N
  30.     Text                    [PreviousInstallOption] :=
  31.   Logical       [InstallWin32s]              := N
  32.     Logical                [Root]                                    := N
  33.     Text                    [CurrentInstallOpt]
  34.     TextArray            [NotEnufFreeHDSpace]
  35.     Text                    [SignOffText]           := installation is complete.
  36.     Text                    [Drive]                                    := C
  37.      Text            [DelteingFilesText]     := Deleting files, please wait...
  38.     Text            [NoFreeSpaceText]             := bytes of free disk space is required!
  39.     Text            [NoSpace]                             := bytes of free disk space is required!
  40.     Text            [WhichLanguage]         :=
  41.     Text            [InstallText]           := Install
  42.     Text            [ConfigText1]           :=
  43.     Text            [ConfigText2]           :=
  44.     Text            [YES_text]              := Ok
  45.     Text            [NO_text]               := No
  46.     Text            [EXIT_text]             := Exit
  47.     Text                        [DRIVE_text]                        := Select Drive
  48.     Text                        [OPTION_text]                        := Select Option
  49.     Text            [UninstallIconText]     := Uninstall
  50.     Text                        [RestartButton]                    := Restart
  51.     Text            [WaitText]              := Please wait...
  52.     Text            [ContinueText]          := Click Ok to continue. Click No ONLY if you are sure Win32s is working on your computer.
  53.     Text            [Win32sText]            := Setup needs to install or upgrade Win32s so that
  54.     Text            [Win32sText1]           := may run correctly.
  55.     Text            [CheckSystemFilesText]  := Checking system files.
  56.     Text            [RestartReminderText]   := Don't forget to restart Windows before running
  57.     Text            [SelectInstallDirText]  := Please choose an installation directory on a fixed drive (example: C: or D: drive).
  58.     Text            [SelectInstallDirText2] := Type in your choice below and select `Ok' to install, or `Exit' to exit the installation now.
  59.     Text            [SelectWin95InstallDirText]        := Setup can install
  60.     Text            [SelectWin95InstallDirText1]    := into the directory listed below.
  61.     Text            [SelectWin95InstallDirText2]    := Click 'OK' to accept, 'Exit' to end installation now, or 'Select Drive' to choose another hard drive.
  62.     Text            [PromptForOptsText]                        := There is not enough free disk space on drive
  63.   Text             [PromptForOptsText2]                    := Click 'Select Option' to choose another install option. Click 'Select Drive' to keep the current option and choose another hard drive. Click 'Exit' to exit the installation now.
  64.     Text                        [VfW_Text]                            := Doonesbury Flashbacks requires the installation of Microsoft Video
  65.     Text                        [VfW_Text1]                            := for Windows for proper operation. If you wish to install Video for
  66.     Text                        [VfW_Text2]                            := Windows now, click the 'Install' button, otherwise, click the
  67.     Text                        [VfW_Text3]                            := 'Don't Install' button. You may install Video for Windows later by
  68.     Text                        [VfW_Text4]                            := running this installation program again.
  69.     Text                        [NoWinDirText]                    := This install does not allow installation to the Windows directory.
  70.     Text                        [NoWinDirText1]                    := Please select another location.
  71.     Text                        [RestartText]                        := It is required that Windows be restarted to complete the
  72.     Text                        [RestartText1]                    := installation. Be sure to exit all DOS programs before clicking
  73.     Text                        [RestartText2]                     := the 'Restart' button.  You can cycle to each DOS program by
  74.     Text                        [RestartText3]                    := holding down the 'Alt' key while pushing the 'Tab' key. Then
  75.     Text                        [RestartText4]                    := 'Atl' - 'Tab' back to this installation.    To restart Windows,
  76.     Text                        [RestartText5]                    := click the 'Restart' button. click the 'Don't Restart' button to
  77.     Text                        [RestartText6]                    := exit the installation now.
  78.     Logical         [Win32Installed]        := N
  79.     Text               [Language]                     := English
  80.     Number                    [FileSetSize]           :=
  81.     Number                    [CompleteSize]          := 12650000
  82.     Number                    [TypicalSize]           := 2075000
  83.     Number                    [MinimalSize]           := 1078
  84.     Number                    [WinGSize]                   := 311000
  85.     Number                    [MiscSysSize]           := 1060000
  86.     Number                    [UninstallSize]         := 250000
  87.     Number          [CopyDlgYPos]           := 0
  88.     Number          [FileCount]             := 0
  89.     Number          [Choice]                := 1010
  90.   Number                     [Continue]                            := 1012
  91.   Number                     [Win32sContinue]                := 1020
  92.   Number                     [W32sInstall]                      := 1018
  93.   Number                     [Install]                                := 1014
  94.   Number                     [Restart]                                := 1016
  95.  
  96.     Directory              [Win32sDir]                            := WIN32S
  97.     Text                      [Win32sListFile]        := WIN32S.LST
  98.     Text                      [Win32sIniFile]                    := WIN32S.INI
  99.     Text                      [Win32sSection]         := Win32s
  100.     Text                      [Win32sVersionKey]            := Version
  101.     Text                      [Win32sCurrentVersion]    := 1.25.142.0
  102.     Text                      [Ole32sCurrentVersion]    := 2.03
  103.     Logical                  [Win32sIniFail]                 := N
  104.     Logical                  [Win32sDirFail]                 := N
  105.     Logical         [Win32sNeeded]          := N
  106.     Text                      [Win32sPrevVersion]     := 1.25.142.0
  107.     Logical                  [Win32s]                                 := N
  108.     Logical         [DotParsed]             := N
  109.     Logical         [BootSectionInvalid]    := N
  110.     TextArray              [Win32Array]
  111.     Number                    [Win32sSize]                         := 4170000
  112.  
  113.     Logical         [InstallWinG]           := N
  114.  
  115.     Number                    [VFWSize]                             := 2400000
  116.     Directory                [VFWDir]                                := VFW
  117.     Logical                    [VFW]                                        := N
  118.     Logical                    [VFWNeeded]                            := N
  119.     Text                        [MSVideoVersion]        := 00001.00010.00000.00200
  120.     Text                        [CodexVersion]              := 00003.00024.00001.00001
  121.     Text                        [FileInUse]                  := BlankString
  122.     Text                        [FileVersionSource]            :=
  123.     Text                        [FileVersionDest]                :=
  124. EndDefineVariables
  125.  
  126. ;;-------------------- BEGIN MAIN --------------------------------------------
  127.  
  128. ;; Turn off INSTALITS' bitmap window
  129. SetDefaultBitmap Off
  130.  
  131. ;; Normally set to `Install'. Set to `Preview' for debugging purposes.
  132. SetInstallModeTo Install
  133. SetTraceMode Off
  134. SetExitConfirmationPrompt off
  135. SetReplacementInquiry Off
  136. SetPopupBorderTo double
  137. SetBackgroundColor 0 0 0 0 0 0 ;; set to Black
  138. [CopyDlgYPos] := MaxY - 155
  139.  
  140. Do WhichWindows
  141.  
  142. If [IsWin95]
  143.   Do Windows95_INSTALL
  144. Else
  145.     If [IsWinNT]
  146.       Do WindowsNT_INSTALL
  147.     Else
  148.       Do WIN31_INSTALL
  149.     EndIf
  150. EndIf
  151.  
  152. If [IsWin95]
  153. Else
  154.     Do SignOff
  155. EndIf
  156. :EXIT
  157. SoLong Quietly
  158.  
  159. ;;--------------------- END MAIN ------------------------------------------
  160.  
  161. Procedure Windows95_INSTALL
  162.  
  163. ;;  Do CheckTempForIni       ;; temp ini left by AUTORUN.EXE
  164. ;;  Do SetLanguage
  165.   SetTopLineTo [ProductName] [InstallText]
  166.   Do DisplayLogo
  167.   Do GetInstallOptions
  168.     Do GetPreviousInstallOption
  169.     If [PreviousInstall]       ;;Fix or change this
  170.         Do    DeInstall
  171.     EndIf
  172.   Do INSTALL
  173.     Do InstallMiscSysFiles
  174.     Do CheckFilesInUse
  175.     Do WriteInstallInfoToIni
  176.   If FileExists [InstallationDirectory]\[MainExeName]  ;; Run Program
  177.     ChangeDirectoryTo [InstallationDirectory]
  178.     Run [InstallationDirectory]\[MainExeName] nowait
  179.   Else
  180.       Do TrimInstallFromDir
  181.        If FileExists [InstallFromDirectory]\[SourceDir]\[MainExeName]  ;; Run Program
  182.         ChangeDirectoryTo [InstallFromDirectory]\[SourceDir]
  183.         Run [InstallFromDirectory]\[SourceDir]\[MainExeName] nowait
  184.      EndIf
  185.      Do RestoreInstallFromDir
  186.   EndIf
  187.   UnloadBitmap 1
  188. EndProcedure
  189.  
  190. Procedure WIN31_INSTALL
  191.  
  192. ;; Do Runanim
  193. ;;  Do WhichLanguage
  194. ;;  Do SetLanguage
  195.   SetTopLineTo [ProductName] [InstallText]
  196.   Do DisplayLogo
  197.     ClearScreen
  198.   TextBox
  199.       [WaitText]
  200.        [CheckSystemFilesText]
  201.   EndTextBox
  202.   If WIN32
  203.   Else
  204.          Do CheckForVFW
  205.      Do CheckWin32s
  206.     EndIf
  207.     Do GetInstallOptions
  208.     Do GetPreviousInstallOption
  209.     If [PreviousInstall]       ;;Fix or change this
  210.         Do    DeInstall
  211.     EndIf
  212.  
  213.   Do INSTALL
  214.      Do WriteInstallInfoToIni
  215.  
  216.   If [Win32sNeeded]
  217.         Do PromptInstallWin32s
  218.         Do ValidateSystemIniFile
  219.         Do EditSystemIniFile
  220.   EndIf
  221.  
  222.     Do InstallMiscSysFiles
  223.     If [VFWNeeded]
  224.         Do AskForVFW
  225.     EndIf
  226.     If [VFW]
  227.     Do RestartWindows
  228.         GoTo Quit
  229.   EndIf
  230.  
  231.   If [Win32Installed] .OR. FileInUse
  232.     Do RestartWindows
  233.     EndIf
  234. :Quit
  235.   ClearScreen
  236.   UnloadBitmap 1
  237. EndProcedure
  238.  
  239. Procedure WindowsNT_INSTALL
  240.  
  241. ;; Do Runanim
  242. ;;  Do WhichLanguage
  243. ;;  Do SetLanguage
  244.   SetTopLineTo [ProductName] [InstallText]
  245.   Do DisplayLogo
  246.     Do CheckForVFW
  247.     Do GetInstallOptions
  248.     Do GetPreviousInstallOption
  249.     If [PreviousInstall]       ;;Fix or change this
  250.         Do    DeInstall
  251.     EndIf
  252.  
  253.   Do INSTALL
  254.     Do WriteInstallInfoToIni
  255.     Do InstallMiscSysFiles
  256.     If [VFWNeeded]
  257.         Do AskForVFW
  258.     EndIf
  259.   ClearScreen
  260.   UnloadBitmap 1
  261. EndProcedure
  262.  
  263. ;;------------------------- END MAIN ----------------------------------------
  264.  
  265. ;;------------------------- BEGIN INSTALL PROCEDURE -------------------------
  266. ;; Procedure Install
  267. ;;
  268. ;;    All product file copying is done here. No subsystem files are copied here.
  269. ;;    Note [Complete] and [Typical] install sections.
  270. ;;  Within the body of CopyFiles...EndCopyFiles, you may specify files by
  271. ;;  *.*, *.ext, or filename.ext. Each specification must be on a separate
  272. ;;    line.  You MAY specify subdirectories in the file specification, if these
  273. ;;    are off the [InstallFromDirectory]\[SourceDir]; in the case of Flashbacks
  274. ;;  this has not been necessary.  Note that [SourceDir] = DA and all
  275. ;;  installable files are located there.
  276.  
  277. Procedure INSTALL
  278.     Do TrimInstallFromDir
  279.     SetCopyAttrTo 00
  280.     If    [Complete]
  281.     CreateDirectoryIfNecessary [InstallationDirectory]
  282.     Logging On
  283.         CopyFiles from [InstallFromDirectory]\[SourceDir] to [InstallationDirectory] @xy(0, [CopyDlgYPos])  [FileSetSize]
  284.             da.exe
  285.             da.ico
  286.             *.cdx
  287.             *.dll
  288.             *.dbf
  289.         EndCopyFiles
  290.     EndIf
  291.     If    [Typical]
  292.     CreateDirectoryIfNecessary [InstallationDirectory]
  293.     Logging On
  294.         CopyFiles from [InstallFromDirectory]\[SourceDir] to [InstallationDirectory] @xy(0, [CopyDlgYPos]) [FileSetSize]
  295.             da.exe
  296.             da.ico
  297.             mxdaan32.dll
  298.             rsmgr32.dll
  299.             mxdacc32.dll
  300.             *.cdx
  301.         EndCopyFiles
  302.     EndIf
  303.  
  304.     CopyFiles from [InstallFromDirectory]\SETUP to [InstallationDirectory]  Quietly
  305.         UNINST.EXE
  306.         UNINST.INF
  307.     EndCopyFIles
  308.  
  309.     If [IsWin95]     ;;  Copy and Run Registry only if Windows 95.
  310.        CopyFiles from [InstallFromDirectory]\SETUP to [InstallationDirectory] Quietly
  311.             REGISTRY.EXE
  312.             FLASH.RGS
  313.        EndCopyFIles
  314.          Do RunRegistry
  315.     EndIf
  316.  
  317.     Do RestoreInstallFromDir
  318.  
  319.     Do CreateAutoIniFile
  320.  
  321.     Do CreateProgramGroup
  322.  
  323. EndProcedure
  324.  
  325.  
  326. ;;-------------------------- END INSTALL PROCEDURE -------------------------
  327.  
  328. ;;------------------------- MISC SYSTEM FILES --------------------------------
  329.  
  330. Procedure InstallMiscSysFiles
  331.     If [Minimal]
  332.         Logging On
  333.     EndIf
  334.     Do TrimInstallFromDir
  335. ;;    If FileExists [WindowsSystemDirectory]\CTL3D32.DLL
  336. ;;        If [IsWin95]
  337. ;;            [FileVerSource] := FileVersionOf [InstallFromDirectory]\SYS\CTL3D32.DLL
  338. ;;            [FileVerDest]     := FileVersionOf [WindowsSystemDirectory]\CTL3D32.DLL
  339. ;;            If [FileVersionSource] <= [FileVersionDest]
  340. ;;                GoTo Skip
  341. ;;            EndIf
  342. ;;        EndIf
  343. ;;    EndIf
  344.     CopyFiles from [InstallFromDirectory]\SYS to [WindowsSystemDirectory]  Quietly
  345.         *.*
  346.     EndCopyFIles
  347. ;; :Skip
  348.     Do RestoreInstallFromDir
  349. EndProcedure
  350.  
  351. ;;------------------------- END MISC SYSTEM FILES ----------------------------
  352.  
  353. ;;-------------------------APPEND REGISTRY INSTALL SCRIPT ----------------------------
  354.  
  355. Procedure AppendRegistryInstallScript
  356. [Dir1] := [InstallationDirectory]
  357. If [Minimal]
  358.     [Dir1] := [InstallFromDirectory]\[SourceDir]
  359. Endif
  360. AppendFile [InstallationDirectory]\FLASH.RGS
  361.     RegCreateKeyEx( HKEY_CLASSES_ROOT, "Flashbacks", 0, "Doonesbury Flashbacks", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hSubKey, &dwDisp )
  362.     RegSetValueEx( HANDLE, "", 0, REG_SZ, "Doonesbury Flashbacks", 25 );
  363.     RegCloseKey( HANDLE );
  364.     //Register 16x16,32x32 icons
  365.     RegCreateKeyEx( HKEY_CLASSES_ROOT, "Flashbacks\DefaultIcon", 0, "Doonesbury Flashbacks", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hSubKey, &dwDisp )
  366.     RegSetValueEx( HANDLE, "", 0, REG_SZ, "[Dir1]\DA.EXE,1", 41 );
  367.     RegCloseKey( HANDLE );
  368.     // Register the program executable
  369.     RegCreateKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\DA.EXE", 0, "Doonesbury Flashbacks", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hSubKey, &dwDisp )
  370.     RegSetValueEx( HANDLE, "", 0, REG_SZ, "[Dir1]\DA.EXE", 37 );
  371.     RegCloseKey( HANDLE );
  372.     // Register uninstall stuff
  373.     RegCreateKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DA.EXE", 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hSubKey, &dwDisp )
  374.     RegSetValueEx( HANDLE, "DisplayName", 0, REG_SZ, "Doonesbury Flashbacks Version 1.0.0", 45 );
  375.     RegSetValueEx( HANDLE, "UninstallString", 0, REG_SZ, "[InstallationDirectory]\UNINST.EXE [InstallationDirectory]\UNINST.INF", 39 );
  376.     RegCloseKey( HANDLE );
  377. ;;    // Special form for incrementing use counter on a shared DLL
  378. ;;    IncUsageKey( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs", "[WindowsSystemDirectory]\wing32.dll" );
  379.     END REGISTRY
  380. EndAppendFile
  381. EndProcedure
  382.  
  383. ;;------------------------- END APPEND REGISTRY INSTALL SCRIPT ----------------------------
  384.  
  385. ;;------------------------- APPEND REGISTRY UNINSTALL SCRIPT ----------------------------
  386.  
  387. Procedure AppendRegistryUninstallScript
  388. AppendFile [InstallationDirectory]\UFLASH.RGS
  389.     RegDeleteKey( HKEY_CLASSES_ROOT, "Flashbacks" );
  390.     RegDeleteKey( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\DA.EXE" );
  391.     // This removes the uninstaller components from the registry
  392.     RegDeleteKey( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DA.EXE" );
  393.     // Special form for decrementing use counter on a shared DLL
  394. ;;    DecUsageKey( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs", "C:\WIN95\SYSTEM\wing32.dll" );
  395.     END REGISTRY
  396. EndAppendFile
  397. EndProcedure
  398.  
  399. ;;------------------------- END APPEND REGISTRY UNINSTALL SCRIPT ----------------------------
  400.  
  401. Procedure RunRegistry
  402.     Do AppendRegistryInstallScript
  403.     Run [InstallationDirectory]\REGISTRY.EXE [InstallationDirectory]\FLASH.RGS
  404.     DeleteFiles from [InstallationDirectory]
  405.         FLASH.RGS
  406.     EndDeleteFiles
  407.     CopyFiles from [InstallFromDirectory]\SETUP to [InstallationDirectory] Quietly
  408.         UFLASH.RGS
  409.     EndCopyFIles
  410.     Do AppendRegistryUninstallScript
  411. EndProcedure
  412.  
  413. Procedure DeInstall
  414.     If [Complete] .OR. [Typical]
  415.         DeleteFiles from [WindowsDirectory]
  416.             DA.INI
  417.         EndDeleteFiles
  418.     EndIf
  419.     If [Typical] ;; .or. [Minimal]
  420.         If DirectoryExists    [InstallationDirectory]
  421.             DeleteFiles from [InstallationDirectory]  Quietly
  422.                 *.dbf
  423.                 mxdaart.dll
  424.                 mxdaenu.dll
  425.                 mxdatenu.dll
  426.             EndDeleteFiles
  427.         EndIf
  428.     EndIf
  429.     If [Minimal]
  430.         If DirectoryExists    [InstallationDirectory]
  431.             DeleteFiles from [InstallationDirectory]  Quietly
  432.                 *.*
  433.             EndDeleteFiles
  434.         EndIf
  435.     EndIf
  436. ;; Minimal needs to know the previous (non-minimal) product directory, if any
  437. ;;    If [Minimal]
  438. ;;      DeleteFiles from [InstallationDirectory] Quietly
  439. ;;            *.*
  440. ;;        EndDeleteFiles
  441. ;;        DeleteDirectory  [InstallationDirectory]
  442. ;;    EndIf
  443. EndProcedure
  444.  
  445. ;; Win95 only
  446. Procedure CheckFilesInUse
  447.     If FileInUse
  448.       CreateFile [WindowsDirectory]\WININIT.INI
  449.         [Number9] := 1    ;;To turn on While loop
  450.  
  451.         While [Number9] > 0
  452.         ExamineTextFile [InstallationDirectory]\LOGFILE
  453.             [Number9] := LineNumberWith (FIU:,FIU:,FIU:)
  454.             [String9] := LineWith (FIU:,FIU:,FIU:)
  455.         ForgetTextFile
  456.             If [Number9] > 0
  457.                 ModifyTextFile [InstallationDirectory]\LOGFILE Quietly NoBackup
  458.                     DeleteLine    [Number9]
  459.                 EndModifyTextFile
  460.                 [FileInUse] := SubstringOf [String9] from 6 to End
  461.                 Do WriteWininitIniFile
  462.             EndIf
  463.         EndWhile
  464.     EndIf
  465. EndProcedure
  466.  
  467. ;; Win95 only
  468. Procedure WriteWininitIniFile
  469.     [Number10] := LengthOf [FileInUse]
  470.     [Number10] := [Number10] - 3
  471.     [String10] := SubstringOf [FileInUse] from Beginning to [Number10]
  472.     ClearArray [Array2]
  473.     [Array2][1] := rename
  474.     [Array2][2] := [FileInUse]
  475.     [Array2][3] := [String10]001
  476.     [Array2][4] := [WindowsDirectory]\WININIT.INI
  477.     WritePrivateProfileString Using [Array2]
  478. EndProcedure
  479.  
  480. Procedure TrimInstallFromDir
  481.     [String11] := INSTALL
  482.     [Number1] := PositionOf [String11] in [InstallFromDirectory]
  483.     [String12] := SubstringOf [InstallFromDirectory] from [Number1] to End
  484.     [Number1] := [Number1] - 1
  485.     [InstallFromDirectory] := SubstringOf [InstallFromDirectory] from Beginning to [Number1]
  486. EndProcedure
  487.  
  488. Procedure RestoreInstallFromDir
  489.     [InstallFromDirectory] := [InstallFromDirectory]\[String12]
  490. EndProcedure
  491.  
  492. Procedure WhichWindows
  493.   If WIN32
  494.      If WindowsVersion >= 3.95
  495.        [IsWin95] := Y
  496.      Else
  497.          If WindowsVersion >= 3.10
  498.              [IsWinNT] := Y
  499.             [IsWin95] := N ;; Windows NT 3.50 or greater ONLY!!!
  500.          EndIf
  501.      Endif
  502.   Else
  503.      [IsWin95] := N   ;; Win31
  504.   EndIf
  505. EndProcedure
  506.  
  507. ;;Win95 only
  508. Procedure CheckTempForIni
  509.     If FileExists [WindowsDirectory]\~UTOTEMP.INI
  510.  
  511.       [Array1][1] := Language
  512.       [Array1][2] := Which
  513.       [Array1][3] := English
  514.       [Array1][4] := [WindowsDirectory]\~UTOTEMP.INI
  515.  
  516.       GetPrivateProfileString Using [Array1]
  517.  
  518.       [Language] := [Array1][5]
  519.  
  520.       DeleteFiles from [WindowsDirectory]
  521.        ~UTOTEMP.INI
  522.       EndDeleteFiles
  523.  
  524.     Else
  525.       Do WhichLanguage  ;; If file not there prompt user for Language.
  526.     EndIf
  527.  
  528. EndProcedure
  529.  
  530.  
  531. Procedure SetLanguage
  532.     Do TrimInstallFromDir
  533.     ExamineTextFile [InstallFromDirectory]\SETUP\[Language].TXT
  534.         [SignOffText]                                  := Line 1
  535.       [NoSpace]                                 := Line 2
  536.       [NoSpace1]                             := Line 3
  537.       [InstallText]                        := Line 4
  538.       [UninstallIconText]           := Line 5
  539.       [YES_text]                           := Line 6
  540.       [NO_text]                         := Line 7
  541.       [WaitText]                    := Line 8
  542.       [ContinueText]                := Line 9
  543.       [Win32sText]                  := Line 10
  544.       [CheckSystemFilesText]        := Line 11
  545.       [RestartText]                 := Line 12
  546.       [RestartReminderText]         := Line 13
  547.         [EXIT_text]                   := Line 14
  548.         [DRIVE_text]                                    := Line 15
  549.         [OPTION_text]                                    := Line 16
  550.       [SelectInstallDirText]        := Line 17
  551.       [SelectInstallDirText2]       := Line 18
  552.         [SelectWin95InstallDirText]        := Line 19
  553.         [SelectWin95InstallDirText1]    := Line 20
  554.         [SelectWin95InstallDirText2]    := Line 21
  555.         [PromptForOptsText]                    := Line 22
  556.         [PromptForOptsText2]                := Line 23
  557.       [ConfigText1]                     := Line 24
  558.       [ConfigText2]                     := Line 25
  559.       [Win32sText1]                 := Line 26
  560.         [NoWinDirText]                                := Line 27
  561.         [NoWinDirText1]                                := Line 28
  562.         [RestartText]                    := Line 29
  563.         [RestartText1]                := Line 30
  564.         [RestartText2]                := Line 31
  565.         [RestartButton]               := Line 32
  566.     ForgetTextFile
  567.     Do RestoreInstallFromDir
  568. EndProcedure
  569.  
  570. Procedure    CheckForVFW
  571.     If FileExists    [WindowsSystemDirectory]\MSVIDEO.DLL
  572.         If [IsWin95]
  573.         Else
  574.             [String3] := FileVersionOf [WindowsSystemDirectory]\MSVIDEO.DLL
  575.             If [String3] > [MSVideoVersion]
  576.                 [VFWNeeded] := Y
  577.             EndIf
  578.         EndIf
  579.     Else
  580.         [VFWNeeded] := Y
  581.     EndIf
  582.     If FileExists    [WindowsSystemDirectory]\IR32.DLL
  583.         If [IsWin95]
  584.         Else
  585.             [String3] := FileVersionOf [WindowsSystemDirectory]\IR32.DLL
  586.             If [String3] > [CodexVersion]
  587.                 [VFWNeeded] := Y
  588.             EndIf
  589.         EndIf
  590.     Else
  591.         [VFWNeeded] := Y
  592.     EndIf
  593. EndProcedure
  594.  
  595. Procedure    AskForVFW
  596.         Do VfWDlgBox
  597.         If    [Install] = 1014
  598.              Do RunVFW
  599.         EndIf
  600. EndProcedure
  601.  
  602. Procedure RunVFW
  603.     Do TrimInstallFromDir
  604.     [String1] := [InstallFromDirectory][VFWDir]\SETUP
  605.     ChangeDirectoryTo [InstallFromDirectory]\[VFWDir]
  606.     Run [String1] NoPrompt
  607.     [VFW] := Y
  608.     Do RestoreInstallFromDir
  609. EndProcedure
  610.  
  611. Procedure DisplayLogo
  612.  [Number6] := (MaxX - [XBmp])/2
  613.  [Number7] := (MaxY - [YBmp])/2
  614.  
  615.  Do TrimInstallFromDir
  616.     If FileExists [InstallFromDirectory]\[SetupDir]\[BitmapName]
  617.          LoadBitmap 1 [InstallFromDirectory]\[SetupDir]\[BitmapName]
  618.        ShowBitmap 1 @xy([Number6],[Number7])
  619. ;;        [BitmapName] := INSTALIT.BMP
  620. ;;        If FileExists [InstallFromDirectory]\[SetupDir]\[BitmapName]
  621. ;;             LoadBitmap 1 [InstallFromDirectory]\[SetupDir]\[BitmapName]
  622. ;;           ShowBitmap 1 @xy([Number6],[Number7])
  623. ;;        EndIf
  624.     Else
  625.         SetBackgroundColor 0 0 64 0 0 255
  626.         SetDefaultBitmap On
  627.     EndIf
  628.   ShowWindow Maximize
  629.  Do RestoreInstallFromDir
  630. EndProcedure
  631.  
  632.  
  633. Procedure Runanim
  634.     Run [InstallFromDirectory]\[SetupDir]\intro.exe mndscape.anm mndscape.wav
  635. ;;    Delay 5000
  636. EndProcedure
  637.  
  638. Procedure PromptInstallDir
  639. ;;Set the install options, if any
  640.     If [Complete]
  641.         [CurrentInstallOpt] := Complete
  642.         [FileSetSize] := [CompleteSize] + [UninstallSize]
  643.     EndIf
  644.     If [Typical]
  645.         [CurrentInstallOpt] := Typical
  646.         [FileSetSize] := [TypicalSize] + [UninstallSize]
  647.     EndIf
  648.     If [Minimal]
  649.         [CurrentInstallOpt] := Minimal
  650.         [FileSetSize] := [MinimalSize] + [UninstallSize]
  651.     EndIf
  652.     If [Win32sNeeded]
  653.         [FileSetSize] := [FileSetSize] + [Win32sSize]
  654.     EndIf
  655.     If [VFWNeeded]
  656.         [FileSetSize] := [FileSetSize] + [VFWSize]
  657.     EndIf
  658.  
  659. ;;Initialize the Win95 Prompt for destination dir dlg
  660.     If [IsWin95]
  661.         [String13] := C
  662.         :Initialize
  663.         If FreeSpaceOnDrive [String13] > [FileSetSize]
  664.             [String10] := [String13]:\Program Files
  665.             LFNGetShortPathName [String10] [String12]
  666.             If DirectoryExists [String12]
  667.                 [String10] := [String13]:\[DefaultDestDir95]
  668.             Else
  669.                 [String10] := [String13]:\[ProductName]
  670.             EndIf
  671.         Else
  672.             If [Options] > 1
  673.                 GoTo PromptForOpts
  674.             Else
  675.                 GoTo PromptForDest
  676.             EndIf
  677.         EndIf
  678.     EndIf
  679.  
  680.     :Again
  681. ;;Run thru the Prompt Dlg logic
  682.     If [IsWin95]
  683.         :PromptWin95InstallDlg
  684.             Do PromptWin95InstallDlg
  685.             If [Continue] = 1022      ;; Select Drive
  686.                 GoTo PromptForDest
  687.             EndIf
  688.             If [Continue] = 1012      ;; Ok
  689.                 GoTo PromptForDestEnd
  690.             EndIf
  691.             If [Continue] = 1011    ;; Exit
  692.                  GoTo EXIT
  693.             EndIf
  694.         :PromptForOpts
  695.             Do PromptForOptsDlgBox
  696.             If [Continue] = 1012
  697.                 GoTo DoOptsAgain
  698.             EndIf
  699.             If [Continue] = 1011    ;; Exit
  700.                 GoTo EXIT
  701.             EndIf
  702.         :PromptForDest    ;;If [Continue] = none of the above, drop thru to here
  703.             DetermineInstallationDrive [FileSetSize] RequireFixed DisallowNetwork
  704.             [String13] := InstallationDrive
  705.             GoTo Initialize
  706.     Else
  707.         [String10] := C:\[DefaultDestDir]
  708.         Do PromptInstallDlg
  709.     EndIf
  710.     :PromptForDestEnd
  711.  
  712.     If [Continue] = 1011
  713.         GoTo EXIT
  714.     EndIf
  715. ;;Filter the user entry for errors
  716.     [Number10] := LengthOf [String10]
  717.     [String11] := SubstringOf [String10] from 1 to 1
  718.  
  719.     If [Number10] > 128  ;; Make sure directory not larger than 128 characters.
  720.         GoTo Again
  721.     EndIf
  722.  
  723.     If [Number10] < 4  ;; Make sure not installing to root
  724.         GoTo Again
  725.     EndIf
  726.  
  727.     If [String10] = BlankString
  728.         GoTo Again
  729.     EndIf
  730.  
  731.     If [String10] =  [WindowsDirectory]
  732.       Do NoWindowsDirectoryDlg
  733.         GoTo Again
  734.     EndIf
  735.  
  736.     If [String10] =  [WindowsSystemDirectory]
  737.       Do NoWindowsDirectoryDlg
  738.         GoTo Again
  739.     EndIf
  740.     If DriveIsPresent [String11]
  741.   Else
  742.         GoTo Again
  743.     EndIf
  744.  
  745.     If DriveIsBernoulli [String11]
  746.         GoTo Again
  747.     EndIf
  748.     If DriveIsCDROM [String11]
  749.         GoTo Again
  750.     EndIf
  751.     If DriveIsRAM [String11]
  752.         GoTo Again
  753.     EndIf
  754.     If DriveIsRemote [String11]
  755.         GoTo Again
  756.     EndIf
  757.     If DriveIsRemoveable [String11]
  758.         GoTo Again
  759.     EndIf
  760.  
  761.     [String11] := SubstringOf [String10] from 2 to 3
  762.     If [String11] <> :\
  763.         GoTo Again
  764.     EndIf
  765.  
  766.     [InstallationDirectory] := SubstringOf [String10] from Beginning to [Number10]
  767.  
  768. EndProcedure
  769.  
  770. Procedure NoWindowsDirectoryDlg
  771.     Dialog
  772.         [NoWinDirText]
  773.         [NoWinDirText1]
  774.     EndDialog
  775. EndProcedure
  776.  
  777. Procedure PromptInstallDlg
  778.     DialogBox 182 108 UseHeader "Doonesbury Flashbacks" Returns [Continue] BlackOnLightGray ModalFrame
  779.         Font "Helv" 10
  780.         GroupBox @xy(4,3) 174 52 ""
  781.     LText @xy( 6, 10) 170 20 [SelectInstallDirText]
  782.     LText @xy( 6,30) 170 20 [SelectInstallDirText2]
  783.         EditText @xy( 7,60) 168 12 Uses [String10] Border
  784.         DefPushButton @xy(23,80) 40 16 [YES_text] 1012
  785.         PushButton @xy(119,80) 40 16 [EXIT_text] 1011
  786.     EndDialogBox
  787. EndProcedure
  788.  
  789. Procedure PromptWin95InstallDlg
  790.     [String5] := [SelectWin95InstallDirText] [ProductName] [SelectWin95InstallDirText1]
  791.     DialogBox 182 108 UseHeader "Doonesbury Flashbacks" Returns [Continue] BlackOnLightGray ModalFrame
  792.         Font "Helv" 10
  793.         GroupBox @xy(4,3) 174 52 ""
  794.     LText @xy( 6, 10) 170 20 [String5]
  795.     LText @xy( 6,30) 170 20 [SelectWin95InstallDirText2]
  796.         EditText @xy( 7,60) 168 10 Uses [String10] Border
  797.         DefPushButton @xy(8,80) 44 16 [YES_text] 1012
  798.         PushButton @xy(69,80) 44 16 [DRIVE_text] 1022
  799.         PushButton @xy(130,80) 44 16 [EXIT_text] 1011
  800.     EndDialogBox
  801. EndProcedure
  802.  
  803. Procedure PromptForOptsDlgBox
  804.     [String6] := [PromptForOptsText] [String13]: for the selected '[CurrentInstallOpt]' option.
  805.      DialogBox 182 108 UseHeader "Doonesbury Flashbacks" Returns [Continue] BlackOnLightGray ModalFrame
  806.         Font "Helv" 10
  807.         GroupBox @xy(4,3) 174 67 ""
  808.         LText @xy( 6, 10) 170 20 [String6]
  809.         LText @xy( 6,30) 170 35 [PromptForOptsText2]
  810.         DefPushButton @xy(7,80) 48 16 [OPTION_text] 1012
  811.         PushButton @xy(68,80) 48 16 [DRIVE_text] 1023
  812.         PushButton @xy(129,80) 48 16 [EXIT_text] 1011
  813.     EndDialogBox
  814. EndProcedure
  815.  
  816. Procedure VfWDlgBox
  817.   DialogBox 248 92 UseHeader "Doonesbury Flashbacks" Returns [Install] BlackOnLightGray ModalFrame
  818.         GroupBox    @xy(4,2) 240 48 ""
  819.     LText @xy( 8, 8) 234 8 [VfW_Text]
  820.         LText @xy( 8,16) 234 8 [VfW_Text1]
  821.         LText @xy( 8,24) 234 8 [VfW_Text2]
  822.     LText @xy( 8,32) 234 8 [VfW_Text3]
  823.         LText @xy( 8,40) 234 8 [VfW_Text4]
  824.     DefPushButton @xy( 29, 60) 46 16 [InstallText] 1014
  825.     DefPushButton @xy(165, 60) 46 16 [EXIT_text] 1013
  826.   EndDialogBox
  827. EndProcedure
  828.  
  829. Procedure RestartReminderDlg
  830.   Dialog  6000 BlackOnLightGray
  831.         [RestartReminderText] [ProductName].
  832.   EndDialog
  833. EndProcedure
  834.  
  835. Procedure CreateAutoIniFile
  836.   CreateFile [InstallationDirectory]\AUTOHD.INI
  837.   AppendFile [InstallationDirectory]\AUTOHD.INI
  838.   [Language]
  839.   which=[Language]
  840.  
  841.   [Uninstall]
  842.   path=[InstallationDirectory]
  843.   EndAppendFile
  844.  
  845. EndProcedure
  846.  
  847. Procedure CreateProgramGroup
  848.     [UninstallIconText] := [ProductName] [UninstallIconText]
  849.     If [IsWinNT] .OR. [Minimal]
  850.            ProgramManagerDDE
  851.             DeleteGroup([ProgGrpName])
  852.         EndProgramManagerDDE
  853.     Else
  854.           ProgramManagerDDE
  855.             ShowGroup([ProgGrpName],1)
  856.             DeleteItem([ProductName])
  857.             DeleteItem(Doonesbury Flashbacks Help)
  858.             DeleteItem([UninstallIconText])
  859.           EndProgramManagerDDE
  860.     EndIf
  861.     Do TrimInstallFromDir
  862.  
  863.     If [Minimal]
  864.         [UninstallDirectory]    := [InstallationDirectory]
  865.         [InstallationDirectory] := [InstallFromDirectory][SourceDir]
  866.     Else
  867.         [UninstallDirectory]    := [InstallationDirectory]
  868.     EndIf
  869.  
  870.   If [IsWin95]
  871.     ProgramManagerDDE
  872.             CreateGroup([ProgGrpName])
  873.             AddItem([InstallationDirectory]\[MainExeName],[ProductName])
  874.     EndProgramManagerDDE
  875.   Else
  876.     ProgramManagerDDE
  877.             CreateGroup([ProgGrpName])
  878.             AddItem([InstallationDirectory]\[MainExeName],[ProductName],[InstallationDirectory]\[IconName])
  879.             AddItem([InstallFromDirectory][SourceDir]\[HelpFileName],Doonesbury Flashbacks Help)
  880.             AddItem([UninstallDirectory]\UNINST.EXE,[UninstallIconText])
  881.     EndProgramManagerDDE
  882.   EndIf
  883.     Do RestoreInstallFromDir
  884.     ;; Restore installation dir to dest dir on HD in minimal case
  885.     If [Minimal]
  886.         [InstallationDirectory] := [UninstallDirectory]
  887.     EndIf
  888. EndProcedure
  889.  
  890. Procedure WhichLanguage
  891.   ShowWindow Minimize
  892.   DialogBox 95 120 UseHeader "Doonesbury Flashbacks" Returns [Choice] BlackOnLightGray ModalFrame
  893.     DefPushButton @xy( 28, 7) 40 16 "English" 1010
  894.     PushButton @xy(28, 29) 40 16 "Franτais" 1011
  895.     PushButton @xy(28, 51) 40 16 "Deutsch" 1012
  896.     PushButton @xy(28, 73) 40 16 "Espa±ol" 1013
  897.     PushButton @xy(28, 97) 40 16 "Italiano" 1014
  898.  EndDialogBox
  899.  
  900.  If [Choice] = 1010
  901.    [Language] := English
  902.  EndIf
  903.  If [Choice] = 1011
  904.    [Language] := French
  905.  EndIf
  906.  If [Choice] = 1012
  907.    [Language] := German
  908.  EndIf
  909.  If [Choice] = 1013
  910.    [Language] := Spanish
  911.  EndIf
  912.  If [Choice] = 1014
  913.    [Language] := Italian
  914.  EndIf
  915.  
  916. EndProcedure
  917.  
  918. Procedure InstallWin32s
  919.         [FileSetSize] := [Win32sSize]
  920.         [String10] := [WindowsSystemDirectory]
  921.         [Drive] := SubstringOf [String10] from 1 to 1
  922.         Do CheckFreeSpace
  923.         If [Minimal]
  924.             Logging On
  925.         EndIf
  926.         CreateDirectoryIfNecessary [WindowsSystemDirectory]\[Win32sDir]
  927.         CopyFiles from [InstallFromDirectory][Win32sDir] to [WindowsSystemDirectory] @xy(0, [CopyDlgYPos]) [FileSetSize]
  928.             *.*
  929.             sysdir\*.*  as win32s\*.*
  930.         EndCopyFiles
  931.         If FileExists [WindowsSystemDirectory][Win32sDir]\mpr.dll
  932.            DeleteFiles from  [WindowsSystemDirectory]\[Win32sDir]
  933.             mpr.dll
  934.            EndDeleteFiles
  935.         EndIf
  936.         [String15] := /s [WindowsSystemDirectory]\OLE2.REG
  937.         Run Regedit  [String15] NoPrompt
  938.         [Win32Installed] := Y
  939. EndProcedure
  940.  
  941.  
  942. Procedure CheckWin32s
  943.  
  944.     If FileExists [WindowsSystemDirectory]\[Win32sIniFile]
  945.         ClearArray [Win32Array]
  946.         [Win32Array][1] := Win32s
  947.         [Win32Array][2] := Version
  948.         [Win32Array][3] := 1.25.140.0
  949.         [Win32Array][4] := [WindowsSystemDirectory]\[Win32sIniFile]
  950.  
  951.         GetPrivateProfileString Using [Win32Array]
  952.  
  953. ;; Parse the WIN32S.INI version # string - must be four fields of four numerical characters each,
  954. ;; with three dot (".") separators distinguishing the fields
  955.         [Number1] := 1
  956.         [Number10] := 0
  957.         [Number11] := 0
  958.         [String1] := [Win32Array][5]
  959.         [Number2] := LengthOf [String1]
  960.         While [Number1] <= [Number2]
  961.             [String2] := SubStringOf [String1] from [Number1] to [Number1]
  962.             If [String2] Contains .
  963.                 If [Number1] = 1
  964.                     [Win32sIniFail] := Y
  965.                 EndIf
  966.                 [Number10] := 0
  967.                 If [DotParsed]
  968.                     [Win32sIniFail] := Y
  969.                 EndIf
  970.                 ;; Keep count of dot field separators, if > 3, fail
  971.                 [Number11] := [Number11] + 1
  972.                 If [Number11] > 3
  973.                     [Win32sIniFail] := Y
  974.                 EndIf
  975.                 [DotParsed] := Y
  976.                 GoTo NoNumCheck
  977.             EndIf
  978.             :NumCheck
  979.             If ([String2] < 0) .OR. ([String2] > 9)
  980.                 [Win32sIniFail] := Y
  981.             Else
  982.                 [Number10] := [Number10] + 1
  983.                 If [Number10] > 4
  984.                     [Win32sIniFail] := Y
  985.                 EndIf
  986.                 [DotParsed] := N
  987.             EndIf
  988.  
  989.             :NoNumCheck
  990.             If [Win32sIniFail]
  991.                 GoTo BadWin32s
  992.             EndIf
  993.             [Number1] := [Number1] + 1
  994.         EndWhile
  995.     Else
  996.         [Win32sIniFail] := Y
  997.         GoTo BadWin32s
  998.     EndIf
  999.     ;; Case where we can determine the version
  1000.     If DirectoryExists [WindowsSystemDirectory]\[Win32sDir]
  1001.         [Win32sPrevVersion] := [Win32Array][5]
  1002.         If [Win32sPrevVersion] < [Win32sCurrentVersion]
  1003.                 [Win32sNeeded] := Y
  1004.         EndIf
  1005.         If [Win32sPrevVersion] = [Win32sCurrentVersion]
  1006.                 Do VerInstall
  1007.         EndIf
  1008.  
  1009.     Else
  1010.  
  1011.     :BadWin32s
  1012.     ;; Case where we can't determine the version!
  1013.  
  1014.             [Win32sNeeded] := Y
  1015.     EndIf
  1016. EndProcedure
  1017.  
  1018. Procedure PromptInstallWin32s
  1019.  ClearScreen
  1020.  [String1] := [Win32sText] [ProductName] [Win32sText1]
  1021.  DialogBox 208 90 UseHeader "Doonesbury Flashbacks" Returns [Number20] BlackOnLightGray ModalFrame
  1022.         Font "Helv" 10
  1023.         GroupBox @xy(4,3) 200 52 ""
  1024.     LText @xy(10,12) 192 20 [String1]
  1025.     LText @xy(10,32) 192 20 [ContinueText]
  1026.     DefPushButton @xy( 34, 65) 40 16 [YES_text] 1012
  1027.     PushButton @xy(129, 65) 40 16 [NO_text] 1011
  1028.  EndDialogBox
  1029.  Do InitWin32sIniFile
  1030.  
  1031.   If [Number20] = 1012
  1032.       Do InstallWin32s
  1033.             If FileInUse
  1034. ;;                Popup Files in use!
  1035.             Else
  1036.           Do EditWin32sIniFile
  1037.             EndIf
  1038.     EndIf
  1039. EndProcedure
  1040.  
  1041. Procedure VerInstall
  1042. ;;    Do TrimInstallFromDir
  1043.     [FileSetSize] := 0
  1044.     [FileCount] := 0
  1045.     While [FileCount] < 55
  1046.         ClearArray [Win32Array]
  1047.         [Win32Array][1] := WindowsSystemWin32s
  1048.         [Win32Array][2] := [FileCount]
  1049.         [Win32Array][3] := "WIN32S.EXE"
  1050.         [Win32Array][4] := [InstallFromDirectory][Win32sListFile]
  1051.         GetPrivateProfileString Using [Win32Array]
  1052.  
  1053.         [FileCount] := [FileCount] + 1
  1054.         ;; [String1] = filename.ext
  1055.         ;; [String2] = filesize
  1056.         [Number1] := PositionOf "," in [Win32Array][5]
  1057.         [Number2] := LengthOf [Win32Array][5]
  1058.         [Number1] := [Number1] + 1
  1059.         [String2] := [Win32Array][5]
  1060.  
  1061.         [String2] := SubstringOf [String2] from [Number1] to [Number2]
  1062.         [Number1] := [Number1] - 2
  1063.         [String1] := [Win32Array][5]
  1064.         [String1] := SubstringOf [String1] from 1 to [Number1]
  1065.  
  1066.     If FileExists [WindowsSystemDirectory]\[Win32sDir]\[String1]
  1067.             [String5] := [InstallFromDirectory][Win32sDir]\sysdir\[String1]
  1068.             [String6] := [WindowsSystemDirectory]\[Win32sDir]\[String1]
  1069.         Else
  1070.             If [Win32sPrevVersion] = [Win32sCurrentVersion]
  1071.                 CopyFiles from [InstallFromDirectory][Win32sDir]\sysdir to [WindowsSystemDirectory]\[Win32sDir] @xy(0, [CopyDlgYPos])
  1072.                  [String1]
  1073.                 EndCopyFiles
  1074.             Else
  1075.                 GoTo InstallWin32s
  1076.             EndIf
  1077.         EndIf
  1078.     EndWhile
  1079.  
  1080.     [FileSetSize] := 0
  1081.     [FileCount] := 0
  1082.     While [FileCount] < 4
  1083.         ClearArray [Win32Array]
  1084.         [Win32Array][1] := WindowsSystem
  1085.         [Win32Array][2] := [FileCount]
  1086.         [Win32Array][3] := "WIN32SYS.DLL"
  1087.         [Win32Array][4] := [InstallFromDirectory][Win32sListFile]
  1088.         GetPrivateProfileString Using [Win32Array]
  1089.         [FileCount] := [FileCount] + 1
  1090.         ;; [String1] = filename.ext
  1091.         ;; [String2] = filesize
  1092.         [Number1] := PositionOf "," in [Win32Array][5]
  1093.         [Number2] := LengthOf [Win32Array][5]
  1094.         [Number1] := [Number1] + 1
  1095.         [String2] := [Win32Array][5]
  1096.         [String2] := SubstringOf [String2] from [Number1] to [Number2]
  1097.         [Number1] := [Number1] - 2
  1098.         [String1] := [Win32Array][5]
  1099.         [String1] := SubstringOf [String1] from 1 to [Number1]
  1100.         If FileExists [WindowsSystemDirectory]\[String1]
  1101.             [String3] := FileVersionOf [InstallFromDirectory][Win32sDir]\[String1]
  1102.             [String4] := FileVersionOf [WindowsSystemDirectory]\[String1]
  1103.         Else
  1104.             If [Win32sPrevVersion] = [Win32sCurrentVersion]
  1105.                 CopyFiles from [InstallFromDirectory][Win32sDir]  to [WindowsSystemDirectory] @xy(0, [CopyDlgYPos])
  1106.                     [String1]
  1107.                 EndCopyFiles
  1108.             Else
  1109.                 GoTo InstallWin32s
  1110.             EndIf
  1111.         EndIf
  1112.     EndWhile
  1113. ;;    Do RestoreInstallFromDir
  1114. EndProcedure
  1115.  
  1116. Procedure InstallWinG
  1117.     If FileExists [WindowsSystemDirectory]\WING32.DLL
  1118.          Do TrimInstallFromDir
  1119.        [String20] := FileVersionOf [InstallFromDirectory]WING\WING32.DLL
  1120.        [String21] := FileVersionOf [WindowsSystemDirectory]\WING32.DLL
  1121.          Do RestoreInstallFromDir
  1122.        If [String21] < [String20]
  1123.           [InstallWinG] := Y
  1124.        EndIf
  1125.     Else
  1126.        [InstallWinG] := Y
  1127.     EndIf
  1128.     If [IsWin95] = N
  1129.         If FileExists [WindowsSystemDirectory]\DVA.386
  1130.         Else
  1131.          [InstallWinG] := Y
  1132.         EndIf
  1133.     EndIf
  1134.  
  1135.     If [InstallWinG]
  1136.  
  1137.        SetCopyAttrTo 00
  1138.          Do TrimInstallFromDir
  1139.        If WIN32
  1140.            CopyFiles from [InstallFromDirectory]WING to [WindowsSystemDirectory] @xy(0, [CopyDlgYPos])
  1141.                   WING32.DLL
  1142.            EndCopyFIles
  1143.         Else
  1144.            CopyFiles from [InstallFromDirectory]WING to [WindowsSystemDirectory] @xy(0, [CopyDlgYPos])
  1145.                      *.dll
  1146.                      *.drv
  1147.                      *.wnd
  1148.                      dva.386
  1149.            EndCopyFiles
  1150.          Do RestoreInstallFromDir
  1151.            ModifyTextFile [WindowsDirectory]\SYSTEM.INI Quietly NoInquiry NoBackup
  1152.           InSection     [386Enh]
  1153.           AddOrChangeLineWith (device=,,DVA.386) as "device=DVA.386" at Beginning IgnoreRemarks
  1154.            EndModifyTextFile
  1155.          EndIF
  1156.      EndIf
  1157. EndProcedure
  1158.  
  1159. Procedure ReinstallDlg
  1160.     Do PromptInstallDir
  1161.     [Dir1] := [InstallationDirectory]
  1162. EndProcedure
  1163.  
  1164. Procedure GetInstallOptions
  1165.     Do TrimInstallFromDir
  1166.     [SetupDirectory] := [InstallFromDirectory]\[SetupDir]
  1167.     Do RestoreInstallFromDir
  1168.  
  1169.     :DoOptsAgain
  1170.     [YesOrNo6] := N
  1171.     If [Options] > 1
  1172.         Do InstallOptions
  1173.     EndIf
  1174.     :DoDirAgain
  1175.     Do PromptInstallDir
  1176.     If [Continue] = 1011
  1177.         GoTo Bail
  1178.     EndIf
  1179.     Do GetTargetDirAndDrive
  1180.     [Dir1] := [InstallationDirectory]
  1181.     Do NoInstallToRoot
  1182.     If [Root]
  1183.         [Root] := N
  1184.         GoTo DoDirAgain
  1185.     EndIf
  1186.     [Drive] := InstallationDrive
  1187.     If [Complete]
  1188.       Do CheckFreeSpace
  1189.         If [YesOrNo6]
  1190.             [Complete] := N
  1191.             GoTo    DoOptsAgain
  1192.         EndIf
  1193.         [FileSetSize] := [CompleteSize]
  1194.     EndIf
  1195.     If [Typical]
  1196.       Do CheckFreeSpace
  1197.         If [YesOrNo6]
  1198.             [Typical] := N
  1199.             GoTo    DoOptsAgain
  1200.         EndIf
  1201.         [FileSetSize] := [TypicalSize]
  1202.     EndIf
  1203.     If [Minimal]
  1204.       Do CheckFreeSpace
  1205.         If [YesOrNo6]
  1206.             [Minimal] := N
  1207.             GoTo    DoOptsAgain
  1208.         EndIf
  1209.         [FileSetSize] := [MinimalSize]
  1210.     EndIf
  1211.     If [IsWin95]
  1212.         Do ParseLFNDirectory
  1213.     EndIf
  1214. EndProcedure
  1215.  
  1216. Procedure MakeLFNDirectory
  1217.     [String5] := [InstallationDirectory]
  1218.     LFNGetShortPathName [String5] [String1]
  1219.     If [String1] = BlankString
  1220.         LFNCreateDirectory [String5] [String1]
  1221.     EndIf
  1222.     [InstallationDirectory] := [String1]
  1223.     [DefaultDestDir95] := [String5]
  1224. EndProcedure
  1225.  
  1226. ;; Save this proc for possible later use - Instalit chokes on single
  1227. ;; ' ' (spacebar) characters in arithmatic ASCII operations, even though
  1228. ;; ' ' is a perfectly legal ASCII character
  1229. Procedure ParseLFNDirectory
  1230. ;; [String1] = the SFN returned by LFNCreateDirectory
  1231. ;; [String2] = the LFN full path
  1232. ;; [String3] = the parsed single character, compared to '\'
  1233. ;; [String4] = the '\' character, compared to [String3]
  1234. ;; [String5] = a single LFN directory, parsed from [String2]
  1235.  
  1236.     [String2] := [String10]
  1237.     [String10] := BlankString
  1238.     [Number1] := 1
  1239.     [Number2] := LengthOf [String2]
  1240.     [String4] := \
  1241.     [YesOrNo5] := N
  1242.     Do ParseForIllegals
  1243.  
  1244.     [String3] := SubstringOf [String2] from [Number1] to [Number1]
  1245.     :Continue
  1246.         While "[String3]" <> "[String4]"
  1247.             [Number1] := [Number1] + 1
  1248.             If [Number1] > [Number2]
  1249.                 [YesOrNo5] := Y
  1250.                 GoTo Finished
  1251.             EndIf
  1252.             [String3] := SubstringOf [String2] from [Number1] to [Number1]
  1253.         EndWhile
  1254.         :Finished
  1255.         [String3] := BlankString
  1256.         [Number1] := [Number1] - 1
  1257.         [String5] := SubstringOf [String2] from Beginning to [Number1]
  1258.         [Number1] := [Number1] + 1
  1259.         If [Number1] = 3   ;; If this the root, skip LFNCreateDirectory
  1260.             GoTo Continue
  1261.         EndIf
  1262.         LFNGetShortPathName [String5] [String1]
  1263.         If [String1] = BlankString
  1264.             LFNCreateDirectory [String5] [String1]
  1265.         EndIf
  1266.         If [YesOrNo5]
  1267.             GoTo ExitParseLFN
  1268.         EndIf
  1269.     GoTo Continue
  1270.     :ExitParseLFN
  1271.     [InstallationDirectory] := [String1]
  1272.     [DefaultDestDir95] := [String5]
  1273. EndProcedure
  1274.  
  1275. ;; use this within ParseLFNDirectory, before creating any directories
  1276. Procedure ParseForIllegals
  1277.     [String6] := ?"/<>*|:
  1278.     [Number3] := 1
  1279.     [Number4] := LengthOf [String6]
  1280.     [String7] := SubstringOf [String6] from [Number3] to [Number3]
  1281.         :Scan
  1282.         If [Number3] <= [Number4]
  1283.             If [String2] Contains [String7]
  1284.                 [Number5] := PositionOf [String7] in [String2]
  1285.                 If [Number5] = 2  ;; If a drive letter colon
  1286.                     GoTo Ok
  1287.                 Else
  1288.                     GoTo DoDirAgain ;;In GetInstallOpts proc
  1289.                 EndIf
  1290.             Else
  1291.                 :Ok
  1292.                 [Number3] := [Number3] + 1
  1293.                 [String7] := SubstringOf [String6] from [Number3] to [Number3]
  1294.                 GoTo Scan
  1295.             EndIf
  1296.         EndIf
  1297. EndProcedure
  1298.  
  1299. Procedure GetTargetDirAndDrive
  1300.   [String1] := [InstallationDirectory]
  1301.   [TargetDir] := SubstringOf [String1] from 3 to End
  1302.   [TargetDrive] := SubstringOf [String1] from 1 to 2
  1303. EndProcedure
  1304.  
  1305. Procedure InstallOptions
  1306.   GetMenuChoice BlackOnLightGray (2*MaxX)/3 MaxY/2 Highlight 1 UseHeader "Doonesbury Flashbacks" BorDlg SysMenu
  1307.          Optimal
  1308.       ; The Optimal install requires a minimum of 12.9 MBytes
  1309.       ; of hard disk space. This choice will significantly increase
  1310.       ; both program execution and graphics display speed. An
  1311.             ; additional 6.4 MBytes may be required if Video for Windows
  1312.             ; or Win32s software needs to be installed on your system.
  1313.             ; Press the Esc key to exit installation at any time.
  1314.         Typical
  1315.       ; The Typical install requires a minimum of 2.33 MBytes
  1316.       ; of hard disk space. This choice will significantly increase
  1317.       ; program execution speed only. An additional 6.4 MBytes may
  1318.             ; be required if Video for Windows or Win32s software
  1319.             ; needs to be installed on your system.
  1320.             ; Press the Esc key to exit installation at any time.
  1321.     Minimal
  1322.       ; The minimum installation requires 250 KBytes of hard disk space.
  1323.       ; space.  Choose this option if free space on your hard drive is
  1324.       ; limited. Program performance will vary with your CD drive speed.
  1325.             ; An additional 6.4 MBytes may be required if Video for Windows
  1326.             ; or Win32s software needs to be installed on your system.
  1327.             ; Press the Esc key to exit installation at any time.
  1328.     EndGetMenuChoice
  1329.  
  1330.   InCase Choice is
  1331.     =1: [Complete] := Y
  1332.                 [Typical]  := N
  1333.             [Minimal]  := N
  1334.     =2: [Typical]  := Y
  1335.                 [Complete] := N
  1336.                 [Minimal]  := N
  1337.     =3: [Minimal]  := Y
  1338.                 [Complete] := N
  1339.                 [Typical]  := N
  1340.   EndInCase
  1341. EndProcedure
  1342.  
  1343. Procedure NotEnufFreeHDSpace
  1344.   Dialog  BlackOnLightGray
  1345.      [NoFreeSpaceText]
  1346.   EndDialog
  1347. EndProcedure
  1348.  
  1349. Procedure CheckFreeSpace
  1350.   If FreeSpaceOnDrive [Drive] < [FileSetSize]
  1351.         Do SetNotEnufFreeHDSpaceLang
  1352.     Do NotEnufFreeHDSpace
  1353.         If [Options] > 1
  1354.             [YesOrNo6] := Y
  1355.         Else
  1356.             UnloadBitmap 1
  1357.             GoTo EXIT
  1358.         EndIf
  1359.   EndIf
  1360. EndProcedure
  1361.  
  1362. Procedure SetNotEnufFreeHDSpaceLang
  1363.  If [Language] = English
  1364.      [NoFreeSpaceText] := [FileSetSize] [NoSpace]
  1365.  EndIf
  1366.  If [Language] = French
  1367.      [NoFreeSpaceText] := [NoSpace] [FileSetSize] [NoSpace1]
  1368.  EndIf
  1369.  If [Language] = German
  1370.      [NoFreeSpaceText] := [FileSetSize] [NoSpace]
  1371.  EndIf
  1372.  If [Language] = Spanish
  1373.      [NoFreeSpaceText] := [NoSpace] [FileSetSize] [NoSpace1]
  1374.  EndIf
  1375.  If [Language] = Italian
  1376.      [NoFreeSpaceText] := [NoSpace] [FileSetSize] [NoSpace1]
  1377.  EndIf
  1378. EndProcedure
  1379.  
  1380. Procedure WriteInstallInfoToIni
  1381.     [Array2][1] := Install
  1382.     [Array2][2] := Options
  1383.     If [Complete]
  1384.         [Array2][4] := [InstallationDirectory]\[ProductIniFile]
  1385.         [Array2][3] := Complete
  1386.     EndIf
  1387.     If [Typical]
  1388.         [Array2][4] := [InstallationDirectory]\[ProductIniFile]
  1389.         [Array2][3] := Typical
  1390.     EndIf
  1391.     If [Minimal]
  1392.         [Array2][4] := [WindowsDirectory]\[ProductIniFile]
  1393.         [Array2][3] := Minimal
  1394.     EndIf
  1395.     WritePrivateProfileString Using [Array2] NoBackup
  1396.     ClearArray    [Array2]
  1397.  
  1398.     [String1] := [InstallFromDirectory]
  1399.     [String2] := SubstringOf [String1] from 1 to 2
  1400.     [Array2][1] := DA
  1401.     [Array2][2] := CDDrive
  1402.     [Array2][3] := [String2]
  1403.     If [Complete]
  1404.         [Array2][4] := [InstallationDirectory]\[ProductIniFile]
  1405.     EndIf
  1406.     If [Typical]
  1407.         [Array2][4] := [InstallationDirectory]\[ProductIniFile]
  1408.     EndIf
  1409.     If [Minimal]
  1410.         [Array2][4] := [WindowsDirectory]\[ProductIniFile]
  1411.     EndIf
  1412.     WritePrivateProfileString Using [Array2] NoBackup
  1413.     If [Minimal]
  1414.         ClearArray [Array1]
  1415.         [Array1][1] := Language
  1416.         [Array1][2] := which
  1417.         [Array1][3] := [Language]
  1418.         [Array1][4] := [WindowsDirectory]\DA.INI
  1419.  
  1420.         WritePrivateProfileString Using [Array1] NoBackup
  1421.     EndIf
  1422. EndProcedure
  1423.  
  1424. Procedure    GetPreviousInstallOption
  1425.     If FileExists [WindowsDirectory]\[ProductIniFile]
  1426.         [String1] :=  [WindowsDirectory]\[ProductIniFile]
  1427.         [PreviousInstall] := Y
  1428.     EndIf
  1429.     If FileExists [InstallationDirectory]\[ProductIniFile]
  1430.         [String1] :=  [WindowsDirectory]\[ProductIniFile]
  1431.         [PreviousInstall] := Y
  1432.     EndIf
  1433.     If [PreviousInstall]
  1434.         ClearArray [Array2]
  1435.         [Array2][1] := Install
  1436.         [Array2][2] := Options
  1437.         [Array2][3] := Minimal
  1438.         [Array2][4] := [String1]
  1439.         GetPrivateProfileString Using [Array2]
  1440.         [PreviousInstallOption] := [Array2][5]
  1441.     EndIf
  1442. EndProcedure
  1443.  
  1444. Procedure NoInstallToRoot
  1445.     [String7] := [Dir1]
  1446.     [String8] := SubstringOf [String7] from 1 to 2
  1447.     If ([String7] = [String8]\)
  1448.         Do NoInstallToRootDlg
  1449.         [Root] := Y
  1450.     EndIf
  1451. EndProcedure
  1452.  
  1453.  
  1454. Procedure EditWin32sIniFile
  1455.     ClearArray [Array2]
  1456.   [Array2][1] := Win32s
  1457.   [Array2][2] := Setup
  1458.   [Array2][3] := 1
  1459.   [Array2][4] := [WindowsSystemDirectory]\[Win32sIniFile]
  1460.   WritePrivateProfileString Using [Array2] NoBackup
  1461.     ClearArray [Array2]
  1462.   [Array2][1] := Win32s
  1463.   [Array2][2] := Version
  1464.   [Array2][3] := [Win32sCurrentVersion]
  1465.   [Array2][4] := [WindowsSystemDirectory]\[Win32sIniFile]
  1466.   WritePrivateProfileString Using [Array2] NoBackup
  1467.     ClearArray [Array2]
  1468.   [Array2][1] := Nls
  1469.   [Array2][2] := AnsiCP
  1470.   [Array2][3] := 1252
  1471.   [Array2][4] := [WindowsSystemDirectory]\[Win32sIniFile]
  1472.   WritePrivateProfileString Using [Array2] NoBackup
  1473.     ClearArray [Array2]
  1474.   [Array2][1] := OLE
  1475.   [Array2][2] := Setup
  1476.   [Array2][3] := 1
  1477.   [Array2][4] := [WindowsSystemDirectory]\[Win32sIniFile]
  1478.   WritePrivateProfileString Using [Array2] NoBackup
  1479.     ClearArray [Array2]
  1480.   [Array2][1] := OLE
  1481.   [Array2][2] := Version
  1482.   [Array2][3] := [Ole32sCurrentVersion]
  1483.   [Array2][4] := [WindowsSystemDirectory]\[Win32sIniFile]
  1484.   WritePrivateProfileString Using [Array2] NoBackup
  1485.  
  1486. EndProcedure
  1487.  
  1488. Procedure InitWin32sIniFile
  1489.     ClearArray [Array2]
  1490.   [Array2][1] := Win32s
  1491.   [Array2][2] := Setup
  1492.   [Array2][3] := 0
  1493.   [Array2][4] := [WindowsSystemDirectory]\[Win32sIniFile]
  1494.   WritePrivateProfileString Using [Array2] NoBackup
  1495.     ClearArray [Array2]
  1496.   [Array2][1] := OLE
  1497.   [Array2][2] := Setup
  1498.   [Array2][3] := 0
  1499.   [Array2][4] := [WindowsSystemDirectory]\[Win32sIniFile]
  1500.   WritePrivateProfileString Using [Array2] NoBackup
  1501. EndProcedure
  1502.  
  1503. Procedure EditSystemIniFile
  1504.     If [BootSectionInvalid]
  1505.         ClearArray [Array2]
  1506.         [Array2][1] := boot
  1507.         [Array2][2] := drivers
  1508.         [Array2][3] := ""
  1509.         [Array2][4] := [WindowsDirectory]\SYSTEM.INI
  1510.         GetPrivateProfileString Using [Array2] NoBackup
  1511.         [String1] := [Array2][5]
  1512.         [String2] := " WINMM16.DLL"
  1513.         ClearArray [Array2]
  1514.         [Array2][1] := boot
  1515.         [Array2][2] := drivers
  1516.         [Array2][3] := [String1][String2]
  1517.         [Array2][4] := [WindowsDirectory]\SYSTEM.INI
  1518.         WritePrivateProfileString Using [Array2] NoBackup
  1519.     EndIf
  1520.     [String1] := Device=[WindowsSystemDirectory]\WIN32S\W32S.386
  1521.     ModifyTextFile [WindowsDirectory]\SYSTEM.INI Quietly NoInquiry NoBackup
  1522.         InSection    [386Enh]
  1523.         AddOrChangeLineWith (DEVICE=,,[WindowsSystemDirectory]\WIN32S\W32S.386) as "DEVICE=[WindowsSystemDirectory]\WIN32S\W32S.386" at Beginning IgnoreRemarks
  1524. ;;        InsertAtLine    End  [String1]
  1525.     EndModifyTextFile
  1526. EndProcedure
  1527.  
  1528. Procedure    ValidateSystemIniFile
  1529.     ClearArray [Array2]
  1530.   [Array2][1] := boot
  1531.   [Array2][2] := drivers
  1532.   [Array2][3] := ""
  1533.   [Array2][4] := [WindowsDirectory]\SYSTEM.INI
  1534.   GetPrivateProfileString Using [Array2] NoBackup
  1535.     [String1] := [Array2][5]
  1536.     [String2] := "WINMM16.DLL"
  1537.     [Number1] :=  1
  1538.     [Number2] :=  LengthOf [String2]
  1539.     [Number3] :=  LengthOf [String1]
  1540.     [String3] := SubstringOf [String1] from [Number1] to [Number2]
  1541.     While [String2] <> [String3]
  1542.         [Number1] :=  [Number1] + 1
  1543.         [Number2] :=  [Number2] + 1
  1544.         If [Number2] > [Number3]
  1545.             [BootSectionInvalid] := Y
  1546.             GoTo Validate386EnhSection
  1547.         EndIf
  1548.         [String3] := SubstringOf [String1] from [Number1] to [Number2]
  1549.     EndWhile
  1550.     :Validate386EnhSection
  1551. EndProcedure
  1552.  
  1553.  
  1554. Procedure CleanUpBMPs
  1555.     SetFileAttrTo 00 for ShadowDirectory\[SWTWLogo]
  1556.     DeleteFiles from ShadowDirectory Quietly
  1557.         [SWTWLogo]
  1558.     EndDeleteFiles
  1559. EndProcedure
  1560.  
  1561. Procedure SignOff
  1562.         DeleteFiles from [WindowsDirectory]
  1563.             *.01
  1564.         EndDeleteFiles
  1565.   Dialog BlackOnLightGray
  1566.     [ProductName] [SignOffText]
  1567.     EndDialog
  1568.  
  1569. EndProcedure
  1570.  
  1571. Procedure RestartWindows
  1572.     Do RestartDFDlgBox
  1573.     If [Restart] = 1016
  1574.         If FileInUse
  1575.             SetCopyAttrTo 00
  1576.         CopyFiles from [SetupDirectory] to [WindowsSystemDirectory] Quietly
  1577.                 FREPLACE.EXE
  1578.         EndCopyFiles
  1579.             [FileReplaceExe] := [WindowsSystemDirectory]\FREPLACE.EXE [InstallationDirectory]\LOGFILE
  1580.             Reboot WindowsAndExec [FileReplaceExe]
  1581.             If [Win32Installed]
  1582.                 Do EditWin32sIniFile
  1583.             EndIf
  1584.         Else
  1585.             Reboot Windows
  1586.         EndIf
  1587.     Else
  1588.         Do RestartReminderDlg
  1589.     EndIf
  1590. EndProcedure
  1591.  
  1592. ;;Doonesbury Series only
  1593. Procedure RestartDFDlgBox
  1594.     [EXIT_text] := Don't Restart
  1595.   DialogBox 198 112 UseHeader "Doonesbury Flashbacks" Returns [Restart] BlackOnLightGray ModalFrame
  1596.         Font "Helv" 10
  1597.     LText @xy(6,9)  188 10   [RestartText]
  1598.         LText @xy(6,19) 188 10     [RestartText1]
  1599.         LText @xy(6,29) 188 10     [RestartText2]
  1600.         LText @xy(6,39) 188 10     [RestartText3]
  1601.         LText @xy(6,49) 188 10     [RestartText4]
  1602.         LText @xy(6,59) 188 10     [RestartText5]
  1603.         LText @xy(6,69) 188 10     [RestartText6]
  1604.         GroupBox @xy(4,3) 190 79 ""
  1605.     DefPushButton @xy( 26, 88) 48 16 [RestartButton] 1016
  1606.     PushButton @xy(131, 88) 48 16    [EXIT_text] 1015
  1607.   EndDialogBox
  1608.  
  1609.   ClearScreen
  1610.  
  1611. EndProcedure
  1612.  
  1613. Procedure RestartReminderDlg
  1614.   Dialog  4000 BlackOnLightGray
  1615.     [RestartReminderText]
  1616.   EndDialog
  1617. EndProcedure
  1618.  
  1619.  
  1620. Procedure DDENonFatalErrorTrap
  1621. ;; Trap the dde error for ReplaceItem.
  1622. ;; See Simple.Stf for more information on how to
  1623. ;; use ProgramManager's DDENonFatalErrorTrap.
  1624. EndProcedure
  1625.  
  1626. EndScript
  1627.